NOTE
1.19 MySQL show profile
Use MySQL profiling to inspect query execution records, then use show profile to examine CPU and block-I/O costs for a selected query.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What It Is
show variables like 'profiling'
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| profiling | OFF |
+---------------+-------+
2. Usage
2.1. Enable
set profiling=on;
2.2. View Results
show profiles;
2.3. Analyze
show profile cpu,block io for query 3;
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub